{extend name="Layout/edit" /}
{block name="content"}
<!-- form start -->
<form class="form-horizontal" action="{:U('editSave')}" method="post">
    <div class="box-body">
        <div class="form-group">
            <label class="col-sm-2 control-label">标题</label>
            <div class="col-sm-10">
                <input type="text" name="title" class="form-control input-sm" value="{$data.title}" placeholder="标题" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">链接地址</label>
            <div class="col-sm-10">
                <div class="btn-group btn-group-justified" aria-label="...">
                    <div class="btn-group">
                        <input type="text" name="link_url" class="form-control input-sm" value="{$data.link_url|default='###'}" placeholder="图片点击跳转地址" required="required" />

                    </div>
                    <div class="btn-group">
                        <div class="input-group">
                            <span class="input-group-addon">链接对象</span>
                            <input type="text" name="target" class="form-control input-sm" value="{$data.target|default='_blank'}" placeholder="链接打开方式(_blank,_self,iframe名称等)" required="required" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">图片</label>
            <div class="col-sm-10">
                <div class="input-group">
                    <input type="text" name="file_path" class="form-control input-sm"  placeholder="图片"  value="{$data['file_path']}"/>
                    <span class="input-group-btn">
                        <a href="{:U('Uploader/delete')}" class="btn btn-default btn-sm xsui-btn-singlefile-delete-image" title="删除图片">删除</a>
                        <a href="{:U('Uploader/single_file','name=file_path')}" class="btn btn-default btn-sm xsui-btn-singlefile-uploader-image" title="选择图片并上传">上传</a>
                        <a href="#" class="btn btn-default btn-sm" title="图片规格：宽度({$adv.image_width}px), 高度({$adv.image_height}px), 图片格式({$adv.file_type}), 图片大小(不超过{$adv.file_size}KB)"><span class="glyphicon glyphicon-question-sign"></span></a>
                    </span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注信息</label>
            <div class="col-sm-10">
                <input type="text" name="remark" class="form-control input-sm"  placeholder="备注信息" size="79" value="{$data['remark']}" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                {xshtml:radio name="status" data='array("1"=>"显示","0"=>"隐藏")' value="data['status']|default='1'" /}
            </div>
        </div>
    </div>
    <input type="hidden" name="id" value="{$data['id']}" />
    <!-- /.box-body -->
    <div class="box-footer">
        <button type="button" class="btn btn-default xsui-btn-close-dialog">取消</button>
        <button type="submit" class="btn btn-primary pull-right">保存</button>
    </div>
    <!-- /.box-footer -->
</form>
{/block}